package com.micromsg.common.model;

import com.micromsg.common.vo.response.DictResponseVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Token的Model类，可以增加字段提高安全性，例如时间戳、url签名
 */
@Data
@NoArgsConstructor
public class TokenModel implements java.io.Serializable {

    public TokenModel(String token, String refreshToken, LoginUser user) {
        this.token = token;
        this.refreshToken = refreshToken;
        this.user = user;
    }

    @ApiModelProperty("token唯一ID")
    private String tokenId;

    @ApiModelProperty("token信息")
    private String token;

    @ApiModelProperty("Refresh Token")
    private String refreshToken;

    @ApiModelProperty("过期时间")
    private Long expiryTime;

    @ApiModelProperty("PC用户信息")
    private LoginUser user;

    @ApiModelProperty("字典列表")
    private List<DictResponseVO> dictList;

    @ApiModelProperty("菜单列表")
    private List<DictResponseVO> menuList;
}
